import request from "@/utils/request";
import type {LoginParams, LoginResult, PermissionUserInfo} from "./types";
import type {BaseResponse} from "../index";

// user统一接口管理
enum API {
    LOGIN_URL = '/system/auth/login',

}

// 暴露登录请求函数
// export function login(data: LoginParams) {
//     return request<LoginResult>({
//         url: API.LOGIN_URL,
//         method: 'post',
//         data
//     })
// }



export const login = (data: LoginParams) => request.post<LoginResult>(API.LOGIN_URL, data);

export const getPermissionUserInfo = () => request.get<PermissionUserInfo>('/system/auth/get-permission-info');
